package com.pengxun.manager.dao.system;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.pengxun.manager.model.system.RoleMenu;
import com.szeastroc.common.jdbc.page.Page;

public interface RoleMenuDao {
   public int insert(RoleMenu roleMenu);
   
   int batchInsert(List<RoleMenu> roleMenus);
   
   public int update(RoleMenu roleMenu);
   
   public int delete(@Param("id") Integer id);
   
   public List<RoleMenu> findByPage(Page page);
   
   List<RoleMenu> findByRoleCode(@Param("roleCode")String roleCode,@Param("status")Integer status);
   
   RoleMenu findByRoleAndPermission(@Param("roleCode")String roleCode,@Param("permissionCode") String permissionCode);
   
   int deleteByRoleCode(@Param("roleCode")String roleCode);
   int deleteByMenuCode(@Param("menuCode")String menuCode);
   int deleteByPermissionCode(@Param("permissionCode")String permissionCode);
   public List<RoleMenu> findByMenuCode(@Param("menuCode")String menuCode);
}
